<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
    
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
	<body>
	<table border=1 width="800px">
		<tr>
			<th>ID</th>
			<th>姓名</th>
			<th>图片</th>
			<th>年龄</th>
			<th>密码</th>
			<th>性别</th>
			<th>生日</th>
			
			<th>
				<a href="${pageContext.request.contextPath }/jsp/add.jsp">添加</a>
			</th>
		</tr>
		
		<c:forEach var="u" items="${lists }">
			<tr>
				<th>${u.uid }</th>
				<th>${u.uname }</th>
				<th><img style="width:100px;height:100px" src="/pic/${u.imgpath}" /></th>
				<th>${u.age }</th>
				<th>${u.upass }</th>
				<th>
					${u.gender }
				</th>
				<th>
					<fmt:formatDate value="${u.birthday }" pattern="yyyy-MM-dd"/>
				</th>
				
				<th>
					<a href="${pageContext.request.contextPath }/user/selectuser?uid=${u.uid}">修改</a>/<a href="${pageContext.request.contextPath }/user/del?uid=${u.uid}">删除</a>
				</th>
			</tr>
			
		</c:forEach>				
	</table>
	<div></div>
</body>
</html>